<template>
  <div class="layout">
    <el-container class="container">
      <el-aside class="aside">
        <div class="line" />
        <home_leftVue></home_leftVue>
      </el-aside>
      <el-container class="content">
        <el-header>
          <div @click="goHome" style="text-align: left;display: flex;align-items: center;"> <img
              src="./static/icon/8.png" alt="" style="width: 16px;height: 16px; margin-right: 10px;"> 首页总览</div>
        </el-header>
        <div class="main">
          <router-view />
        </div>
        <!-- <Footer /> -->
      </el-container>
    </el-container>
    <!-- <el-container class="container">
      <router-view />
    </el-container> -->
  </div>
</template>
<script setup>
import { provide } from "vue";
import test from "./view/test.vue";
//引入echarts
import * as echarts from "echarts";

//通过provide提供echarts
provide("echarts", echarts);
</script>

<script>
import home_leftVue from "./components/home_left.vue";

export default {
  name: "App",
  components: {
    home_leftVue,
    test,
  },
  setup() {
    const goHome = () => {
      this.$router.push("/");
    };
    return {
      goHome,
    };
  },
};
</script>
<style>
@import url("./index.css");

.line {
  float: left;
  margin-right: 10px;
  height: 20px;
  width: 6px;
  background-color: blue;
}

.common-layout {
  height: 100%;
}

.el-container {
  height: 100%;
}

.el-header,
.el-footer {
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  background-color: #D3DCE6;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.main {
  background-color: #F6F7FB;
}

.el-main {
  background-color: #E9EEF3;
  color: #333;
  text-align: center;
  line-height: 160px;
}

body>.el-container {
  margin-bottom: 40px;
}

.el-container:nth-child(5) .el-aside,
.el-container:nth-child(6) .el-aside {
  line-height: 260px;
}

.el-container:nth-child(7) .el-aside {
  line-height: 320px;
}

.layout {
  min-height: 100vh;
  background-color: #ffffff;
}

.container {
  height: 100vh;
}

.aside {
  width: 200px !important;
  background-color: #222832;
}

.head {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
}

.head>div {
  display: flex;
  align-items: center;
}

.head img {
  width: 50px;
  height: 50px;
  margin-right: 10px;
}

.head span {
  font-size: 20px;
  color: #ffffff;
}

.line {
  border-top: 1px solid hsla(0, 0%, 100%, .05);
  border-bottom: 1px solid rgba(0, 0, 0, .2);
}

.content {
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  overflow: hidden;
}

.main {
  height: calc(100vh - 100px);
  overflow: auto;
  padding: 10px;
}
</style>

<style>
body {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.el-menu {
  border-right: none !important;
}

.el-submenu {
  border-top: 1px solid hsla(0, 0%, 100%, .05);
  border-bottom: 1px solid rgba(0, 0, 0, .2);
}

.el-submenu:first-child {
  border-top: none;
}

.el-submenu [class^="el-icon-"] {
  vertical-align: -1px !important;
}

a {
  color: #409eff;
  text-decoration: none;
}

.el-pagination {
  text-align: center;
  margin-top: 20px;
}

.el-popper__arrow {
  display: none;
}
</style>